-- ##### EXT_LIBS #####

dofile("fat:/dualua/ext_libs/bit.lua")
dofile("fat:/dualua/ext_libs/hex.lua")

-- ##### DEFS #####

dofile("fat:/dualua/headers/video.lua")

-- ##### CONST ######

DUALUA_VERSION = "0.1"

SCREEN_WIDTH = 256
SCREEN_HEIGHT = 192

SCREEN_UP = 1
SCREEN_DOWN = 0
SCREEN_BOTH = 2

-- ################################ START ################################

Video.setMode(MODE_FB0)
VRAM.setBankA(VRAM_A_LCD)

screen.print("HELLO WORLD!")

screen.waitForVBlank()

--[[while true do

	status_global_microlua_errors, err_global_microlua_errors = pcall(function ()
	    str = "/lua/libs/"
		dofile(str.."shell.lua")
	end)
	if err_global_microlua_errors ~= nil then
		Debug.OFF()	
		Controls.read()
		while not Keys.newPress.Start do
			Controls.read()
			screen.drawFillRect(SCREEN_UP, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Color.new(0, 0, 31))
			screen.drawFillRect(SCREEN_DOWN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Color.new(0, 0, 31))
			screen.drawTextBox(SCREEN_DOWN, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, "*** ERRORS OCCURED ***\n"..err_global_microlua_errors.."\n"..debug.traceback().."\n*********************\n\nPress START to continue")
			render()
		end
	end

end]]
